Patent document 1 discloses a photointerrupter as an example of a conventional optical device. The photointerrupter includes a light-emitting element and alight-receiving element that are mounted on a substrate. The light emitted from the light-emitting element is received by the light-receiving element after being reflected by a detection target. This makes it possible to detect that the detection object is located opposite to the photointerrupter.
The above-noted photointerrupter may be incorporated in an electronic apparatus for use. In such a case, it is necessary to provide a common opening in the casing of the electronic apparatus, so that the light emitted from the light-emitting element and the light received by the light-receiving element can pass through the opening. It is desirable for this opening to be small in view of, for example, protection of components within the electronic apparatus. However, conventional photointerrupters still have room for improvement in terms of reducing the size of an opening.